package com.kh.statistics.video.core.statistics.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @BelongsProject: statistics
 * @BelongsPackage: com.kh.statistics.video.core.statistics.entity
 * @Author: Hong.Kong
 * @CreateTime: 2024-06-19  13:28
 * @Description: TODO
 * @Version: 1.0
 */
@NoArgsConstructor
@Data
public class XhsUserPostResp {

    @JsonProperty("data")
    private DataDTO data;
    @JsonProperty("code")
    private Integer code;
    @JsonProperty("success")
    private Boolean success;
    @JsonProperty("msg")
    private String msg;

    @NoArgsConstructor
    @Data
    public static class DataDTO {
        @JsonProperty("cursor")
        private String cursor;
        @JsonProperty("notes")
        private List<NotesDTO> notes;
        @JsonProperty("has_more")
        private Boolean hasMore;

        @NoArgsConstructor
        @Data
        public static class NotesDTO {
            @JsonProperty("note_id")
            private String noteId;
            @JsonProperty("xsec_token")
            private String xsecToken;
            @JsonProperty("type")
            private String type;
            @JsonProperty("display_title")
            private String displayTitle;
            @JsonProperty("user")
            private UserDTO user;
            @JsonProperty("interact_info")
            private InteractInfoDTO interactInfo;
            @JsonProperty("cover")
            private CoverDTO cover;

            @NoArgsConstructor
            @Data
            public static class UserDTO {
                @JsonProperty("nick_name")
                private String nickName;
                @JsonProperty("avatar")
                private String avatar;
                @JsonProperty("user_id")
                private String userId;
                @JsonProperty("nickname")
                private String nickname;
            }

            @NoArgsConstructor
            @Data
            public static class InteractInfoDTO {
                @JsonProperty("liked")
                private Boolean liked;
                @JsonProperty("liked_count")
                private String likedCount;
                @JsonProperty("sticky")
                private Boolean sticky;
            }

            // FIXME generate failure  field _$HeiGht309
            @NoArgsConstructor
            @Data
            public static class CoverDTO {
                @JsonProperty("width")
                private Integer width;
                @JsonProperty("url")
                private String url;
                @JsonProperty("trace_id")
                private String traceId;
                @JsonProperty("info_list")
                private List<InfoListDTO> infoList;
                @JsonProperty("url_pre")
                private String urlPre;
                @JsonProperty("url_default")
                private String urlDefault;
                @JsonProperty("file_id")
                private String fileId;

                @NoArgsConstructor
                @Data
                public static class InfoListDTO {
                    @JsonProperty("image_scene")
                    private String imageScene;
                    @JsonProperty("url")
                    private String url;
                }
            }
        }
    }
}
